<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Xquared example - Form and Textarea</title>
	<link rel="stylesheet" type="text/css" href="../stylesheets/xq_ui.css" />
	<script type="text/javascript" src="../javascripts/XQuared.js?load_others=1"></script>
	<script type="text/javascript">//<![CDATA[
	var xed;
	
	window.onload = function() {
		xed = new xq.Editor("xqEditor");
		
		xed.config.enablePreventExit = true;
		xed.config.PreventExitMessage = "Document is not empty. If you want to leave, click 'Ok' button.";

		xed.setEditMode('wysiwyg');
		xed.setWidth("100%");
	}
	//]]></script>
</head>

<body>
	<form action="#" method="post" onsubmit="alert(document.getElementById('xqEditor').value); return false;">
		<label>Subject: <input type="text" name="subject" /></label>
		<label>Content:
		<textarea name="content" id="xqEditor">&lt;p&gt;Hello &lt;a href="#"&gt;World&lt;/a&gt;!&lt;/p&gt;</textarea>
		</label>
		<input type="submit" />
	</form>
</body>
</html>
